﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using Models;

namespace BLL
{
    public class adminManager
    {
        //管理员登录
        public static bool  CheckLogin(string adminName, string pwd)
        {
            return adminService.SelectByNameAndPwd(adminName, pwd) != null ? true : false;
        }
        //管理员登录
        public static bool CheckusersSLogin(string username, string pwd)
        {
            return adminService.SelectByNameAndPwd(username, pwd) != null ? true : false;
        }

        public static List<User> SelelctAll()
        {
            return adminService.SelelctAll();
        }
        //精确查找
        public static User SelectById(int id)
        {
            return adminService.SelectById(id);
        }
        //增加
        public static bool Add(User user)
        {
            //return adminService.Insert(user);
        }
        //更改
        public static bool Edit(User user)
        {
            //return adminService.update(user);
        }
        //删除
        public static bool Delete(int id)
        {
            return adminService.Delete(id);
        }
    }
}
